/**   
* @Title: DaoFactory.java 
* @Package com.element5th.shop.comm 
* @Description: 
* @author 第五小组  
* @date 2012-11-4 上午10:15:26 
* @version V1.0   
*/ 
package com.element5th.shop.comm;

import com.element5th.shop.dao.admin.AdminDaoImpl;
import com.element5th.shop.dao.admin.IAdminDao;
import com.element5th.shop.dao.bbs.AdminBbsDaoImpl;
import com.element5th.shop.dao.bbs.BbsDaoImpl;
import com.element5th.shop.dao.bbs.IAdminBbsDao;
import com.element5th.shop.dao.bbs.IBbsDao;
import com.element5th.shop.dao.good.AdminGoodDaoImpl;
import com.element5th.shop.dao.good.GoodDaoImpl;
import com.element5th.shop.dao.good.IAdminGoodDao;
import com.element5th.shop.dao.good.IGoodDao;
import com.element5th.shop.dao.leaveword.AdminWordDaoImpl;
import com.element5th.shop.dao.leaveword.IAdminWordDao;
import com.element5th.shop.dao.leaveword.IWordDao;
import com.element5th.shop.dao.leaveword.WordDaoImpl;
import com.element5th.shop.dao.order.AdminOrderDaoImpl;
import com.element5th.shop.dao.order.IAdminOrderDao;
import com.element5th.shop.dao.order.IOrderDao;
import com.element5th.shop.dao.order.OrderDaoImpl;
import com.element5th.shop.dao.user.AdminUserDaoImpl;
import com.element5th.shop.dao.user.IAdminUserDao;
import com.element5th.shop.dao.user.IUserDao;
import com.element5th.shop.dao.user.UserDaoImpl;

/** 
 * @ClassName: DaoFactory 
 * @Description: 
 * @author  第五小组
 * @date 2012-11-4 上午10:15:26 
 *  
 */
public final class DaoFactory {
	/*使工厂不能被实例化*/
	private DaoFactory(){
	}
	/*各个Dao接口*/
	private static IAdminDao adminDao = null;
	private static IAdminBbsDao adminBbsDao = null;
	private static IBbsDao bbsDao = null;
	private static IAdminGoodDao adminGoodDao = null;
	private static IGoodDao goodDao = null;
	private static IAdminWordDao adminWordDao = null;
	private static IWordDao wordDao = null;
	private static IAdminOrderDao adminOrderDao = null;
	private static IOrderDao orderDao = null;
	private static IAdminUserDao adminUserDao = null;
	private static IUserDao userDao = null;
	/**
	 * @return the adminDao
	 */
	public static IAdminDao getAdminDao() {
		if(adminDao == null)
			adminDao = new AdminDaoImpl();
		return adminDao;
	}
	/**
	 * @return the adminBbsDao
	 */
	public static IAdminBbsDao getAdminBbsDao() {
		if(adminBbsDao == null)
			adminBbsDao = new AdminBbsDaoImpl();
		return adminBbsDao;
	}
	/**
	 * @return the bbsDao
	 */
	public static IBbsDao getBbsDao() {
		if(bbsDao == null)
			bbsDao = new BbsDaoImpl();
		return bbsDao;
	}
	/**
	 * @return the adminGoodDao
	 */
	public static IAdminGoodDao getAdminGoodDao() {
		if(adminGoodDao == null)
			adminGoodDao = new AdminGoodDaoImpl();
		return adminGoodDao;
	}
	/**
	 * @return the goodDao
	 */
	public static IGoodDao getGoodDao() {
		if(goodDao == null)
			goodDao = new GoodDaoImpl();
		return goodDao;
	}
	/**
	 * @return the adminWordDao
	 */
	public static IAdminWordDao getAdminWordDao() {
		if(adminWordDao == null)
			adminWordDao = new AdminWordDaoImpl();
		return adminWordDao;
	}
	/**
	 * @return the wordDao
	 */
	public static IWordDao getWordDao() {
		if(wordDao == null)
			wordDao = new WordDaoImpl();
		return wordDao;
	}
	/**
	 * @return the adminOrderDao
	 */
	public static IAdminOrderDao getAdminOrderDao() {
		if(adminOrderDao == null)
			adminOrderDao = new AdminOrderDaoImpl();
		return adminOrderDao;
	}
	/**
	 * @return the orderDao
	 */
	public static IOrderDao getOrderDao() {
		if(orderDao == null)
			orderDao = new OrderDaoImpl();
		return orderDao;
	}
	/**
	 * @return the adminUserDao
	 */
	public static IAdminUserDao getAdminUserDao() {
		if(adminUserDao == null)
			adminUserDao = new AdminUserDaoImpl();
		return adminUserDao;
	}
	/**
	 * @return the userDao
	 */
	public static IUserDao getUserDao() {
		if(userDao == null)
			userDao = new UserDaoImpl();
		return userDao;
	}
}
